<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>事件委托</title>
    <style>
        .con {
            background: rgba(0, 0, 0, .2);
            border: 1px solid #ff9;
        }
        .btn1, .btn2, .btn3 {
            width: 300px;
            height: 50px;
            border: 1px solid #000;
            text-align: center;
            line-height: 50px;
            cursor: pointer; }
    </style>
</head>
<body>
<div class="con">
    <button id="btn1">点击我变色</button>
    <p id="btn2">点击出弹窗</p>
    <h6 id="btn3">点击做跳转</h6>
</div>

</body>
</html>